import React from 'react'
import {
    Routes,
    Route, HashRouter,
} from "react-router-dom";
import Login from './pages/Login'
import Container from "./components/Container";
import User from "./pages/User";
import Device from "./pages/Device";
import Data from "./pages/Data";
import Monitor from "./pages/Monitor";

const RouteLists = () => (
    <HashRouter>
        {/*匹配404页面需要路由组件Switch包裹*/}
        <Routes initialEntries={['/']}>
            {/* 默认路由 */}
            <Route path="/" element={<Container content={<Device/>}/>} exact/>
            <Route path="/login" element={<Login/>} exact/>
            <Route path="/data" element={<Container content={<Data/>}/>} exact/>
            <Route path="/user" element={<Container content={<User/>}/>} exact/>
            <Route path="/monitor" element={<Container content={<Monitor/>}/>} exact/>
            {/*<Route path="*" element={<NoMatch/>}/>*/}
        </Routes>
    </HashRouter>
);

export default RouteLists;